<?php

// parent_id:      this.parent_id,
// typename:       this.typename,
// dirname:        this.dirname,
// diy_dirpath:    this.diy_dirpath,
// dirpath:        this.dirpath,
// is_hidden:      this.is_hidden,
// englist_name:   this.englist_name,
// seo_title:      this.seo_title,
// seo_keywords:   this.seo_keywords,
// seo_description:this.seo_description,
// litpic:         this.litpic

require "database.php";

$base=new Db;

$posts=$_POST;

$id=$_POST["id"];

$_r_=$base->doSql('update ey_arctype set parent_id="'.$posts["parent_id"].'",typename="'.$posts["typename"].'",dirname="'.$posts["dirname"].'",diy_dirpath="'.$posts["diy_dirpath"].'",dirpath="'.$posts["dirpath"].'",is_hidden="'.$posts["is_hidden"].'",englist_name="'.$posts["englist_name"].'",seo_title="'.$posts["seo_title"].'",seo_keywords="'.$posts["seo_keywords"].'",seo_description="'.$posts["seo_description"].'",litpic="'.$posts["litpic"].'",add_time="'.time().'",status=1,admin_id="'.$posts["admin_id"].'" where id="'.$id.'"');


if($_r_){
    return json([
        "code"=>200    
    ]);
}else{
    return json([
        "code"=>-1   
    ]);
}

